<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    // 1.原始值不能有属性
    let name = 'Jack'
    name.age = 27;
    console.log(name.age) // undefined

    // 2.使用new
    let name2 = new String('wind')
    name2.age = 66;
    console.log(name2.age) // 66
    console.log(name2) //  {0:w,1:i,2:n,3:d,age:66}

    // 3.转换类数组
    console.log(Array.from(name2)) // age消失了
</script>
</body>
</html>